#pragma pack_matrix(row_major)

#include "Defs/types.hlsli"
#include "Defs/ConstantBuffers.hlsli"
#include "../EdgeGraphics/VertexFormats.h"

#define MAX_LIGHTS 4

differedVSOutput main(VertexNormalTextureTangent input)
{
	differedVSOutput outval = (differedVSOutput)0;
	float4 localH = mul(float4(input.position, 1.f), world);
		localH = mul(localH, viewProj);

	outval.tbn[2] = mul(float4(input.normal, 0.f), world).xyz;
	outval.tbn[0] = mul(float4(input.tangent, 0.f), world).xyz;
	outval.tbn[1] = cross(outval.tbn[2], outval.tbn[0]);

	outval.position = localH;
	outval.depthDiv = localH.zw;
	outval.uv = input.texCoord;

	return outval;
}